home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / c / sozobon / sozbin15.zoo / sozdistr / doc / binary.doc / ld.man < prev    next >
Encoding:
Text File  |  1995-09-09  |  7.2 KB  |  265 lines

  1.  
  2.  
  3. LD (1)                Sozobon Programmer's Manual                 LD (1)
  4.  
  5.  
  6.  
  7.  
  8. NAME
  9.         ld - The SozobonX Linker (loader)
  10.  
  11. SYNOPSIS
  12.         ld [options] [<file> ...]
  13.  
  14.  
  15.         ld [-Vvhtpmb][-v2] [--nofload][--nofram] [--nofmem]
  16.  
  17.              [-B <n>] [-o <file>] [-u <symbol>] [-L <path>] 
  18.  
  19.                   [-f <link file>] | [<file> ...]
  20.  
  21. DESCRIPTION
  22.         The    ld  command links object modules and libraries to form an
  23.         executable program.  Both object modules and  libraries  may  be
  24.         passed to  ld  for linking.  It can handle DRI, SozobonX objects
  25.         and DRI archives only.
  26.  
  27.         By default the output is written  to  file    'a.out',  and  the
  28.         Fastload,  'load to FastRAM' and the  'malloc from FastRAM' pro-
  29.         gram header flags are set.
  30.  
  31.         Several options may be specified to alter the operation  of  the
  32.         linker:
  33.  
  34. OPTIONS
  35.          --version 
  36.          -V 
  37.              Print detailed Version information to stdout and exit
  38.          --help 
  39.          -h 
  40.              Print the synospsis information (usage) and exit
  41.          -v   (verbose) 
  42.              Generally show more information about what  ld is doing and
  43.              print short version information (to stderr).
  44.          -v2 
  45.              If  you put two  'v's or a  '-v2' into commandline  ld will
  46.              be more verbose, printing the symbols  looked  for  in  the
  47.              libraries,  and  the  extern  symbols  of  the  newly added
  48.              modules from the libraries.
  49.          -B<n> 
  50.              Increase the limits for internal  buffers  by  factor  <n>.
  51.              This  option  will be replaced by some automatic allocation
  52.              routines some time.
  53.          -t   (table) 
  54.              Put a symbol table in the output file.
  55.          -p   (passes) 
  56.              Make multiple  passes  over  each  library  until  no  more
  57.              references can  be  satisfied.    If  libraries are ordered
  58.              appropriately, this option is not needed and  linking  will
  59.              be faster.
  60.          -f  <file>
  61.  
  62.  
  63.  
  64. v 2.00x9                      Jul 21 1994                         Page 1
  65.  
  66.  
  67.  
  68.  
  69. LD (1)                Sozobon Programmer's Manual                 LD (1)
  70.  
  71.  
  72.  
  73.              This  option  is  useful  when many files are to be linked.
  74.              The loader reads the file <file> specified for  a  list  of
  75.              object modules  and  libraries  to be linked.  Names in the
  76.              file should be separated by white space or  newlines.    cc
  77.              will always use this option.
  78.          -o  <file>
  79.              By  default,  the  name of the executable file is  'a.out'.
  80.              This option allows a different name to be specified.
  81.          -u  <symbol>
  82.              Forces ld to link the symbol  <symbol> at  once  if  it  is
  83.              found in any library module.
  84.              The given  symbol is marked as undefined.  This can be use-
  85.              ful when linking  from  libraries.    And  a  symbol  (e.g.
  86.              __printf)  can  be  marked as undefined to force loading it
  87.              from a library, before another module  (e.g.  from  another
  88.              library) asks for it.
  89.          -b 
  90.              This  option  can  be  used  when linking large programs to
  91.              reduce the amount of memory used by the loader.  The loader
  92.              makes more disk accesses when this option is used.
  93.          -M 
  94.          -m 
  95.              Print a load map.  (I've read anywhere -M is  standard?)  A
  96.              table  of all linked objects with their sizes is printed to
  97.              stdout.
  98.         -L<path>
  99.              Add  path  to  the  search  list  to  find  following   (in
  100.              commandline) libraries  and  object  modules.    The pathes
  101.              specified with -L option are searched first, after cwd  and
  102.              before  builtin  or  $LIB pathes, in the order specified in
  103.              the commandline.
  104.          --nofload 
  105.              Do not set Fastload flag in  program  header  of  generated
  106.              executable.
  107.          --nofram 
  108.              Do  not  set  'load  to  FastRAM' flag in program header of
  109.              generated executable.
  110.          --nofmem 
  111.              Do not set 'malloc from FastRAM' flag in program header  of
  112.              generated  executable.
  113.  
  114. ENVIRONMENT
  115.         $LIBDIR  This  path  replaces  the  builtin  search  pathes  for
  116.         libraries and object modules not to find in cwd.
  117.  
  118.         $LIB A list of pathes where libraries and object modules are  to
  119.         search.   If  this  variable is specified the builtin pathes and
  120.         the  $LIBDIR path are ignored for searches.
  121.  
  122.         If  $STDERR is present, stderr handle (2) is used for diagnostic
  123.         output.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. v 2.00x9                      Jul 21 1994                         Page 2
  131.  
  132.  
  133.  
  134.  
  135. LD (1)                Sozobon Programmer's Manual                 LD (1)
  136.  
  137.  
  138.  
  139. DIAGNOSTICS
  140.         Warnings:
  141.         message:
  142.         Double def of <sym>: in <module (archive)> type <char>,
  143.                         in <module (archive)> type <char>
  144.         
  145.         Tells you that symbol <sym> is defined in the two named modules,
  146.         the second module name is the first definition. The type char
  147.         [Text|Data|Bss|Common|?] tells you the symbols' type in the module.
  148.         
  149.         If a symbol is already defined, the first definition is used.
  150.         
  151.         message:
  152.         Common sizes differ: <sym> in <module (archive)> <size>,
  153.                                 in <module (archive)> <size>
  154.         
  155.         Tells you, that Common symbol <sym> is defined with different sizes
  156.         in different modules.
  157.         The larger size will be used for that symbol.
  158.         ErrorMessages:
  159.         message:
  160.         Undef <sym> from <module (archive)>
  161.         
  162.         The symbol <sym>, used in <module> (maybe in others, too) isn't
  163.         defined in any specified module. (No output!)
  164.         
  165.         message:
  166.         Undef Common <sym> from <module (archive)>
  167.         
  168.         The Common symbol <sym> is never defined with a length value.
  169.         (No output is generated!);
  170.  
  171. LIMITS
  172.         The number of handled files, objects and symbols is still limited:
  173.         60 different files
  174.         1000 global symbols in resulting object (executable)
  175.         400 symbols in every object module
  176.         600 objects in a library (only used for rescanning - multiple passes)
  177.         300 objects currently used
  178.  
  179. SEE ALSO
  180.         cc(1), nm(1), ar(1), libsort(1)
  181.  
  182. BUGS
  183.         Without doubt, there are some bugs in  this  program.    If  you
  184.         discover one, please report it to maintainer.
  185.  
  186. AUTHOR
  187.         Written by Johann Ruegg, Copyright (c) 1988,89,90,91 by Sozobon,
  188.         Ltd.
  189.  
  190.         eXtended Version by Holger Weets, Jerry G Geiger (1992-1995)
  191.  
  192.  
  193.  
  194.  
  195.  
  196. v 2.00x9                      Jul 21 1994                         Page 3
  197.  
  198.  
  199.  
  200.  
  201. LD (1)                Sozobon Programmer's Manual                 LD (1)
  202.  
  203.  
  204.  
  205. VERSION
  206.         ld V2.00x10 Apr 8 1995
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262. v 2.00x9                      Jul 21 1994                         Page 4
  263.  
  264.  
  265.